package com.usf.jprovider.object.type;

import java.text.ParseException;
import java.util.Date;

import com.usf.jprovider.tools.DateTools;

public class JDate extends JType<Date> {

	public JDate() {
		super();
		this.value = new Date();
	}
	
	public JDate(Date value, String format) {
		super(value, format);
	}
	public JDate(String value, String format) throws Exception{
		super(value, format);
	}

	@Override
	protected Date parse(String value, String format) throws ParseException {
		return DateTools.valueOf(value, format);
	}
	@Override
	protected String format(String format) {
		return DateTools.format(value, format);
	}
}
